package com.itcast.applet.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "商品实体类")
@JsonSerialize
public class Commodity implements Serializable {

    @ApiModelProperty("主键值")
    private Long id;

    @ApiModelProperty("商品名称")
    private String name;

    @ApiModelProperty("商品折扣")
    private Double discount;

    @ApiModelProperty("商品价格")
    private Double price;

    @ApiModelProperty("库存数量")
    private Integer number;

    @ApiModelProperty("商品描述")
    private String present;

    @ApiModelProperty("商品状态起售")
    private Integer status;

    @ApiModelProperty("分类表Id")
    private Integer sortId;

    @ApiModelProperty("商品创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("商品图片信息")
    private List<DityUrl> dityUrl;

    @ApiModelProperty("商品评价")
    private List<Evaluate> evaluate;

}
